package com.lzyjkz.quick_admin.web.request;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

@Data
public class SysUserRegisterRequestDTO {
    @NotNull(message = "用户名不能为空")
    @Length(min = 6, max = 20, message = "用户名长度必须在6-20之间")
    private String username;
    @NotNull(message = "密码不能为空")
    @Length(min = 6, max = 20, message = "密码长度必须在6-20之间")
    @Pattern(regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d]{6,20}$", message = "密码必须包含大小写字母和数字")
    private String password;
    @NotNull(message = "确认密码不能为空")
    private String confirmedPassword;
}
